package org.jample.poi.util;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

import org.apache.poi.hssf.usermodel.HSSFWorkbook;

public class XlsReader {
    public static HSSFWorkbook read(String url) {
        FileInputStream fis = null;
        try {
            fis = new FileInputStream(url);
            HSSFWorkbook wb = new HSSFWorkbook(fis);
            return wb;
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if (fis != null) {
                try {
                    fis.close();
                } catch (Exception e2) {
                    e2.printStackTrace();
                }
            }
        }
        return null;
    }
}
